package com.leenmvc.core.security.entity.core;

import com.leenmvc.core.annotation.DbInfo;
import com.leenmvc.core.annotation.PrimaryKey;
import com.leenmvc.core.base.BaseEntity;
import com.leenmvc.core.utils.logger.LogEntity;

import java.util.Date;

/**
 * sql语句记录表
 *
 * @author Mark sunlightcs@gmail.com
 * @since 1.0.0 2019-12-24
 */

@DbInfo(value = "sys_log_sql", comment = "SQL日志")
public class SysLogSql extends BaseEntity implements LogEntity {

    @PrimaryKey
    private Long id;
    /**
     * 用户名
     */
	private String username;
    /**
     * sql语句
     */
	private String sqlStr;
    /**
     * 参数
     */
	private String params;
    /**
     * 操作的接口的说明
     */
	private String note;
    /**
     * 接口uri
     */
	private String uri;
    /**
     * 影响的条数
     */
	private Integer influence;
    /**
     * 执行时间长度
     */
	private Integer excuteTime;

	private Date createDate;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getSqlStr() {
        return sqlStr;
    }

    public void setSqlStr(String sqlStr) {
        this.sqlStr = sqlStr;
    }

    public Integer getInfluence() {
        return influence;
    }

    public void setInfluence(Integer influence) {
        this.influence = influence;
    }

    public String getParams() {
        return params;
    }

    public void setParams(String params) {
        this.params = params;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public String getUri() {
        return uri;
    }

    public void setUri(String uri) {
        this.uri = uri;
    }

    public Integer getExcuteTime() {
        return excuteTime;
    }

    public void setExcuteTime(Integer excuteTime) {
        this.excuteTime = excuteTime;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @Override
    public SysLogSql clean() {
        this.id = null;
        this.username = null;
        this.sqlStr = null;
        this.params = null;
        this.note = null;
        this.uri = null;
        this.excuteTime = null;
        this.createDate = null;
        return this;
    }
}
